<template>
	<div>	
       <header class="my">
       	<img src="../assets/tx.jpg"/>
        <p>zhangsan <br />段位：学富五车</p>
       </header>
       <div class="mycollect">
       	 <i class="mintui mintui-field-success">我的收藏 </i>      
       </div>
	  	<div v-for="item in collects" :key="item.id">
		<router-link :to="{name:'msgdetail',query:{id:item.id}}">
			<mt-cell :title="item.title" >
  <span>{{item.last_reply_at|ymd}}</span>
  <img slot="icon" :src="item.author.avatar_url" width="24" height="24">
</mt-cell>
</router-link>
	</div>
	  <!--<mt-cell title="我的收藏" icon="icon-test4" is-link></mt-cell>
	  <mt-cell title="我的留言"  icon="liuyan1" is-link></mt-cell>
	  <mt-cell title="我的已购"  icon="icon-test" is-link></mt-cell>
	  <mt-cell title="我的学习"  icon="ic_history" is-link></mt-cell>-->
	<!--  <input type="button" value="退出登陆" class="btn"/> -->
	</div>
</template>

<script>

    export default {
    	name:'App',
    	components: {

		},
        data(){
             return{
                username:'请登录',
                collects:[]
            }
        },
        methods:{
        	logSucces(data){
        	this.username = data.username
        	},

        },
       created: function () {
	//let loginname=this.$route.query.loginname;
    this.$axios.get('https://cnodejs.org/api/v1/topic_collect/alsotang')
    .then((res) => {
     console.log(res.data)
     this.collects=res.data.data
    }, (err) => {
      console.log(err)
    })
  },
            computed:{
    Logout:function(){
       var flag= this.$store.state.isLogin ;
       flag=0;
    }
}
        }

</script>

<style>
	.my{
		width: 100%;
		margin: 0 auto;
		height: 80px;
		padding: 10px 0 10px 10px;
	}
	.my img{
		width: 48px;
		height: 48px;
		border: solid 3px #fff ;
		border-radius: 50%;
		float: left;
		margin-right: 10px;
	}
.mycollect{
	padding: 10px;
	color: orangered;
}
</style>